﻿@model borkoSi.Models.Videos

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "borkoSi - Videi";
}

@section bodytitle{
    <h1>Videi</h1>
    <h2><a href="@ViewBag.FlickrPhotostreamURL" title="Vsi videi so tudi na Flickerju" target="_blank">Vsi videi tudi na Flickerju</a></h2>
}

<div class="body-left-other">
    <span>Leto 2013</span>
    <br /><br />
    <div id="dropdownPoint">     <!-- pointPoint NE DELA!!! -->
        @Html.DropDownList("VideosDropdown", (IEnumerable<SelectListItem>)@Model.VideosDropdownItems, new { style =  "width: 220px;"})
    </div>
</div>

<div class="body-right-other">
    <div id="videoFlickr" style="margin-left: 70px; padding-left: 90px; border-left: 1px solid black"/>
</div>

@section Scripts
{

    <script type="text/javascript" src="@Url.Content("/Scripts/myFunctions.js")"></script>
   
    <!-- jQuery -->
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    
    <script type="text/javascript">

        $(document).ready(function () {

            // pointPoint points to 'dropdownPoint'
            //pointPoint('dropdownPoint');

            // at begining video is set to dropdown's "at start" selected value
            prepareVideo('VideosDropdown', 'videoFlickr');

            $('#VideosDropdown').change(function () {

                // prepares video with right link
                prepareVideo('VideosDropdown', 'videoFlickr');

            });

        });

    </script>
}

